package upms.api.fallback;

import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
import upms.api.feign.RemoteTestService;

@Slf4j
@Component
public class RemoteTestFallback implements FallbackFactory<RemoteTestService> {
    @Override
    public RemoteTestService create(Throwable cause) {
        log.error("服务调用失败:{}", cause.getMessage());
        return usersVo -> null;
    }
}